#remove all purchased item

if [ "$1" = "-c" ]; then
  if [ "$2" = "" ]; then
    echo -n "Do you want to remove all purchased items from the list (y/n)? "
    read input
    if [ "$input" = "y" ]; then
       grep '|-' ushop.$LOGNAME | cat > ushop.$LOGNAME		
       echo 'Your purchased items have been cleared from the shopping list.' 
       cat ushop.$LOGNAME	
    else
        exit
    fi	
  fi
else
  exit
fi
